package com.itheima.writer;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

public class WriterDemo {

    public static void main(String[] args) throws IOException {

        /*
        void write(int c) 一次写一个字符
        void write(char[] cbuf) 一次写一个字符数组
        abstract void write(char[] cbuf, int off, int len)一次写一个字符数组中的一部分，off开始索引，len个数
        void write(String str) 一次写一个字符串
         */

        Writer writer = new FileWriter("day11\\b.txt");

       writer.write(48);

       writer.write('0');

       writer.write("周琦");

       char[] chars = {'a','b','c','d'};
       writer.write(chars);

       writer.close();


    }
}
